<!doctype html>
<html lang="zh">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="/assets/images/icon-64.png" type="image/x-icon">
    <link rel="shortcut icon" href="/assets/images/icon-64.png" type="image/x-icon">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

    <title>{{ .title }}-家庭物资管理系统</title>
    <style>
        html {
            height: 100%;
            width: 100%;
        }

        body {
            width: 100%;
            height: 100%;
            background-image: url('/assets/images/bg.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            color: whitesmoke;
        }

        .container-fluid {
            max-width: 1366px;
            min-height: 100%;
            padding: 0;
            background: rgba(0, 0, 0, 0.7);
        }

        .container-fluid>.row {
            margin-left: 5px;
            margin-right: 5px;
        }
    </style>
</head>

<body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container">
            <a class="navbar-brand" href="/">
                <img src="/assets/images/icon-64.png" alt="" width="30" height="24"
                    class="d-inline-block align-text-top">
                家庭物资管理系统
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText"
                aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarText">
                <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                    <li class="nav-item">
                        <a class='nav-link {{if eq .title "物品清单"}}active{{end}}' aria-current="page" href="/items">物品清单</a>
                    </li>
                    <li class="nav-item">
                        <a class='nav-link {{if eq .title "设置"}}active{{end}}' aria-current="page" href="/settings">设置</a>
                    </li>
                    <!-- <li class="nav-item">
                            <a class="nav-link active disable" aria-current="page" href="#">缴费记录（尚未完成）</a>
                        </li> -->
                </ul>
                <span class="navbar-text">
                    {{ .username }} - <a href="/logout">登出</a>
                </span>
            </div>
        </div>
    </nav>
    {{template "content" .}}


    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
        crossorigin="anonymous"></script>

</body>

</html>